package ch1;

public class SysTest {

	public static void main(String[] args) {
		// 系统信息
		System.out.println(System.getenv());
		System.out.println(">>>>>>>>>>>>>>>>>>>");
		System.out.println(System.getProperties());

		String op = System.getProperty("os.name");
		if (op.equals("Windows 7")) {
			System.out.println("win7粉丝");
		} else {
			System.out.println("其他系统");
		}
		try {
			System.out.println("AAaa");
			// System.exit(1);
		} finally {
			System.out.println("finally");
		}
		long time = System.currentTimeMillis();
		System.out.println(time);
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>..");
		System.out.println(System.nanoTime());
		int a = 10;
		double b = 10.0;
		long start = System.nanoTime();
		a *= 17;
		long end = System.nanoTime();
		System.out.println(end - start);
		long start2 = System.nanoTime();
		b *= 10.4446;
		long end2 = System.nanoTime();
		System.out.println(end2 - start2);
	}

}
